package org.icy.utils;

import org.icy.core.loaders.ClassLoaderFactory;

public class ClassLoaderUtils {

	public static Object loadClass(String className, String type) throws Exception {
		ClassLoader loader = ClassLoaderFactory.getClassLoader(type);
		Class<?> cls = loader.loadClass(className);
		return cls.newInstance();
	}
	
	public static boolean testClass(String className) {
		try {
			Class.forName(className);
			return true;
		} catch (Exception ex) {
			return false;
		}
	}
}
